Repository navigation
fix(runtime)!: the confirmation an action declares travels with the flow it starts - #33721
Conversation
…low it starts An AI service account does not confirm an action for itself. When an action of type 'flow' whose target is a flow declares ai.requiresConfirmation: true, the trigger routes (POST /automation/:name/trigger and the legacy /automation/trigger/:name) refuse the account with the action door's own 428 ACTION_CONFIRMATION_REQUIRED, through the one flow start admission predicate, before any run exists and whatever the request carries. A person, an OAuth-delegated agent, a flow no confirmation-gated action targets, and the action door's own gate are unchanged. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
…start 503 Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
…ries-action-confirmation
…llection Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 15 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 6 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 30 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin afa9e651ce4c6e253533aa064415efd7f8b0a114 && git checkout afa9e651ce4c6e253533aa064415efd7f8b0a114
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b76df9a6980d935c194f778e7eb10aca382aac4c d27cc149b3c2fc645da139f35f346aac750c93c4 && git checkout -B drift-repro b76df9a6980d935c194f778e7eb10aca382aac4c && git merge --no-ff d27cc149b3c2fc645da139f35f346aac750c93c4
node scripts/docs-audit/affected-docs.mjs --json b76df9a6980d935c194f778e7eb10aca382aac4c
|
|
security#1 · sunhaolin · session_017xRBcT1w3zpekijraHJE4f Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (the maintainer routes contract-tier reviews to the review seat, 2026-11-15T07:31Z) · head 1469738 A no-card security#1 order. The reviewer reads the advisory through the relay as the order names it. Seat notes:
Generated by Claude Code |
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract-review-claim: session_01FEkQ5nhu4dRbKVQKDB4CDB · head 1469738 · 2026-11-15T07:33Z |
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract reviewServed-tier: Inputs read: the PR body, file list (5 paths) and net diff against Check-runs at the time of reading: 27 success, 20 skipped, 8 ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentAgainst M1, must-fix. M2, must-fix. S1, should-fix. S2, should-fix. Nits.
Delta review of M1, M2, S1 and S2 is owed by this reviewer on the fixing head. The PR carries Implemented-by: VERDICT: FAIL |
…ne, reads every bare-door source, and is asked without the flow probe A listing service that is wired and fails to resolve refuses an AI service account's start as a throwing listing does, with one flat 503 owned by the predicate and confined to the declaration read. On a host with neither merged listing the rule reads the ObjectQL registry and the metadata service, as the bare actions door does. The rule reads the flow's name and the declarations only, so it is asked without the definition probe. The docs state that the declared-endpoint door is not judged by it yet. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract-review-claim: session_01FEkQ5nhu4dRbKVQKDB4CDB · head 42c1c3c · 2026-11-15T08:09Z |
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract reviewServed-tier: Delta review of record 6891224813 (FAIL on head Check-runs at the time of reading: 33 success, 16 skipped, ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentFindings of record 6891224813:
New in the hop: M3, must-fix.
Nit. Nit. On a host with no merged listing both sources are read in full on every account start, and one declaration can be read twice. No contract effect (see ①). Delta review of M3 is owed by this reviewer on the fixing head. The PR carries Implemented-by: VERDICT: FAIL |
…absent one The ObjectQL engine slot is resolved loud, as the two listing slots are, and the metadata service's object and standalone action listings are read where their throw travels, so a wired slot that fails to resolve and a listing that throws each refuse an AI service account's start with the 503. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract-review-claim: session_01FEkQ5nhu4dRbKVQKDB4CDB · head f9b12d5 · 2026-11-15T09:08Z |
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract reviewServed-tier: Delta review of record 6891559352 (FAIL on head Check-runs at the time of reading: 51 in all, 35 success, 16 skipped, none failed, none pending. The gate verdict on this head is complete and green. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentFindings of record 6891559352:
New in the hop: M4, must-fix.
S3, should-fix. Delta review of M4 and S3 is owed by this reviewer on the fixing head. The PR carries Implemented-by: VERDICT: FAIL |
…ries-action-confirmation
…or reads, loud on failure Each slot is resolved in resolveService's order (the request's own kernel first), and only a miss is classified by resolveServiceOrLoud, so the declarations are the ones the same request's /actions door reads in every host shape and a wired slot that fails to resolve still refuses. The jsdoc and changeset now say a read failure that arrives as a throw admits nothing. Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
…ule harness Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract-review-claim: session_01FEkQ5nhu4dRbKVQKDB4CDB · head 9714122 · 2026-11-15T10:08Z |
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract reviewServed-tier: Delta review of record 6892189765 (FAIL on head Inputs read:
The test file and the changeset are the lane's remainder at Check-runs at the time of reading: 51 in all, 35 success, 16 skipped, none failed, none pending. The gate verdict on this head is complete and green. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentFindings of record 6892189765:
New in the hop: M5, must-fix.
Nit. The six host-shape pins drive the Delta review of M5 is owed by this reviewer on the fixing head. The PR carries Implemented-by: VERDICT: FAIL |
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract-review-claim: session_01FEkQ5nhu4dRbKVQKDB4CDB · head f7941c7 · 2026-11-15T10:35Z |
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract reviewServed-tier: Delta review of record 6892841584 (FAIL on head Inputs read:
The test file and the changeset are the lane's remainder at Check-runs at the time of reading: 54 in all, 27 success, 18 skipped, none failed, 9 still in progress ( ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentFindings of record 6892841584:
New in the hop: Nit. The new pin is named as a rule and records a limitation. When the per-leg loud resolution lands, this case is the one that changes its answer. A word in its title or a comment beside it saying so would keep the next author from reading it as the intended end state. No contract effect. Delta review of M5 is owed by this reviewer on the fixing head. The PR carries Implemented-by: VERDICT: FAIL |
…le, and per-leg loud resolution is named as a shared follow-up Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract-review-claim: session_01FEkQ5nhu4dRbKVQKDB4CDB · head d27cc14 · 2026-11-15T11:02Z |
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract reviewServed-tier: Delta review of record 6893136915 (FAIL on head Inputs read:
The test file and the changeset are the lane's remainder at Check-runs on this head: 55 in all, 37 success, 18 skipped, none failed, none pending. The gate verdict on this head is complete and green. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentFindings of record 6893136915:
New in the hop: Nit. Two words for one thing in No must-fix and no should-fix is open on this head. This is the final round for this head; the open nits are accepted deviations or follow-ups. Implemented-by: VERDICT: PASS |
|
security#1 · sunhaolin · session_017xRBcT1w3zpekijraHJE4f 席位意见: 同意落地。AI 服务账号经两个 trigger 路由按名启动"被要求确认的动作所指向的流程"时,改为与动作入口同样回 428;人、委托 agent、未被门控的流程不变。复核席指出这是收紧安全行为,需维护者本人批准;另请裁定 席位核对ACCEPT at
Implemented-by: os-dev (security#1 order, Generated by Claude Code |
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Maintainer ruling: rule 2b under a failed environment service, and the
|
… an unserved verb answers the automation domain, as its bare path does (objectstack-ai#33926) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbCpddLFmKzR39wJWZpkRMCi)_ Fixes objectstack-ai#33026 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:独立服务器上,带命名空间地址的 `/automation/:ns/:name/runs`、`/automation/:ns/:name/trigger`、`/automation/trigger/:ns/:name` 收到不支持的方法时,改由自动化领域回答(与不带地址的同一路由一致),不再由传输层回答。 - 为什么改:同一路由因写法不同返回两种错误信封、两种 `Allow`;匿名调用者在带地址写法上拿到 405(暴露路由形状)而不是 401。 - 风险与回滚:只在调度器里多声明三条「领域决定所有方法」的路由;已服务的方法照旧;回滚即还原该 PR。 - 先看:`packages/runtime/src/dispatcher-plugin.ts` 新增的三行声明;`automation-every-verb.hono.integration.test.ts` 的新行与命名空间假数据。 - 两分钟验证:`pnpm --filter @objectstack/runtime exec vitest run src/automation-every-verb.hono.integration.test.ts`,预期 57/57 通过。 - 需要你做的:无,席位落地。 ## What changes - `registerAutomationRoutes` (`packages/runtime/src/dispatcher-plugin.ts`) declares three more patterns through `domainDecidesEveryVerb` (objectstack-ai#24228's mechanism): GET `/automation/:ns/:name/runs`, POST `/automation/:ns/:name/trigger`, POST `/automation/trigger/:ns/:name`. These are the addressed shapes (ADR-0150 D5) of the bare rows that were already declared. A verb the router cannot route on them now reaches `dispatch()`, so the anonymous floor answers `401` and the domain's `automationRouteAllow` answers `405` with `Allow: GET` / `Allow: POST` in the dispatcher's envelope. - Measured before the change, on a real Hono socket at `1e65a389`: `DELETE /api/v1/automation/crm/send_digest/runs` answered `405`, `Allow: GET, HEAD`, with an `error.details` envelope, for a signed-in and an anonymous caller alike. The bare `DELETE /api/v1/automation/send_digest/runs` answered the domain's `405 Allow: GET` (signed in) and `401` (anonymous). The domain itself was never at fault: dispatched directly, the addressed shapes already answer its `405` (`automation-addressed-route.test.ts`). The gap was only the transport declaration. No edit to `runtime/src/domains/automation.ts`. ## Tests `automation-every-verb.hono.integration.test.ts` (both prefixes): - Added rows: DELETE / POST / PUT on `/automation/crm/send_digest/runs`, GET on `/automation/crm/send_digest/trigger` and GET on `/automation/trigger/crm/send_digest`. Each row has an anonymous `401` case and a signed-in domain `405` case. - Added controls: a served POST on both addressed triggers runs the flow; GET and DELETE on `/automation/no_such_ns/send_digest/runs` answer the dispatcher's `404 ROUTE_NOT_FOUND`. - `crm` is installed through an ObjectQL registry double answering the holder table the address reads. <details><summary>Ablation, one per declaration (scripts/ablation-replace.mjs, each restored to the HEAD blob with git diff HEAD empty)</summary> - Without `:ns/:name/runs`: `Tests 14 failed | 43 passed (57)`. The failures are every addressed `/runs` row on both prefixes, plus the no-namespace DELETE control. - Without `:ns/:name/trigger`: `Tests 4 failed | 53 passed (57)`. The failures are the anonymous and signed-in GET on `/automation/crm/send_digest/trigger`, on both prefixes. - Without `trigger/:ns/:name`: `Tests 4 failed | 53 passed (57)`. The failures are the anonymous and signed-in GET on `/automation/trigger/crm/send_digest`, on both prefixes. </details> ## Acceptance notes - Same behaviour on a `createHonoApp` host (catch-all): it already handed every verb to `dispatch()`. No change there. ## Verification Readings at `9bdd492b`, the head before the last `origin/main` merge. That merge brought no change to the three files here. - `pnpm --filter @objectstack/runtime typecheck`: exit 0. - `pnpm --filter @objectstack/runtime test`: `Test Files 603 passed (603) / Tests 10934 passed | 19 skipped`. - Direct dependents exercising the dispatcher on Hono: `@objectstack/http-conformance` test, `Test Files 20 passed / Tests 292 passed`. `@objectstack/client` `package-addressing.test.ts`, `83 passed`. - `automation-every-verb.hono.integration.test.ts`: `57 passed (57)`. - eslint on both touched `.ts` files: exit 0. - `dispatch-gates --commands`: 67 run, reconciled with `--ran` (67 derived, 67 run). 65 exit 0. Two NOT MEASURED on prerequisites: `check:dual-build-cjs-loads` needs a full `pnpm build`; `check:type-check-debt`'s inner build never got the lock. Final head `39826829` (merge of `origin/main`, which carries objectstack-ai#33721 and objectstack-ai#33844 in `packages/runtime`): the scoped re-check (closure build, runtime typecheck, the every-verb, addressed-route, contract-mounts, clone-mount and route-ledger suites) is NOT MEASURED. The shared verify lock was held by another worktree's run for over 27 minutes. CI's Test Core runs the package on this head. --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
…not judged at the automation save doors (objectstack-ai#33970) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbCpddLFmKzR39wJWZpkRMCi)_ Fixes objectstack-ai#32733 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:自动化保存检查通知渠道时,消息服务返回的渠道列表里只要有一个元素不是 `{ id }` 形状,就整体按「读不到」处理(不判),不再过滤后误拒所有渠道;迁移说明条目补齐两种不判情形和路径写法。 - 为什么改:过滤后的空名单会让所有渠道都被 400 拒绝,属于静默误拒;迁移说明要与已发布的 changelog 一致。 - 风险与回滚:只改判定前的读取,第一方消息服务返回的形状不受影响;回滚即还原单个 commit。 - 先看:`packages/runtime/src/domains/automation.ts`(`refuseUnknownNotifyChannels` 的读取段)、新增 pin、`18.notify-channel-unknown-refused.ts`。 - 两分钟验证:`pnpm --filter @objectstack/runtime exec vitest run src/domains/automation-authoring-doors-durable.test.ts`,预期全部通过。 - 需要你做的:无,席位落地。 ## What changes - **N1.** If `getKnownChannels()` answers a list with any member that is not a `{ id: string }`, the registry is now treated as unreadable: nothing is judged and the save goes on. The declared channel contract, which the check reads structurally in `packages/runtime/src/domains/automation.ts`, is `interface NotifyChannelRegistry { getKnownChannels(): ReadonlyArray<{ id: string; configured: boolean }> }`. Its docblock says: "Every channel the service knows: the ones registered directly, and each lazy provider (`email`, `sms`, `push`) whether or not its transport is installed yet." Its one producer, `MessagingService.getKnownChannels()` in `@objectstack/service-messaging`, answers `Array<{ id: string; configured: boolean }>`. A list off that shape is outside the contract, so it gives no verdict, the same as a reader that throws or answers no list. Before, such members were dropped and the shrunken roster refused every channel the node named. Removing that false refusal is outside any declared accept set and changes no authorable key: `Clause-②: no`, `Metadata-protocol: none`. - **N2.** The semantic entry `notify-channel-unknown-refused` (`packages/spec`, data text only) now names every not-judged case the doors have, as the released changelog entry does, and the paths a refusal names. Review face: `CONTRACT_REVIEW_TIER` (packages/spec data text). - **N3.** Declined: the field is `relevantWhen`, read by `os migrate meta`, but its contract says to omit it unless the surface lives only under top-level stack keys; a flow saved through the `/automation` doors is stored runtime metadata, outside the stack, so a `stack-declares` question cannot prove it absent. Same for the picklist sibling. ## Tests - New pin in `automation-authoring-doors-durable.test.ts`: a reader answering bare ids, and a list with one bare id, both save 200 with the node naming `email`. - Ablation (filter restored in place of the guard, via `scripts/ablation-replace.mjs`): `× a list with any member that is not a { id: string } is unreadable… AssertionError: reader-bare-ids: expected 400 to be 200`; restored, blob equals HEAD, `git diff HEAD` empty. ## Acceptance notes - `content/docs/automation/flows.mdx` does not list the two not-judged cases (before `kernel:ready`, an unreadable reader) nor the list-member and region-body paths; it is outside this PR's surface. ## Verification All readings at head `f3979189`, which is `42667cd1` merged with `origin/main`. That main includes objectstack-ai#33721 (`83198201`), whose `automation.ts` hunks do not touch the `getKnownChannels()` read. The merge was clean, and the PR delta is exactly the four files below. - Under os-verify-lock (VERDICT command-exit 0): runtime `^...` closure build exit 0; runtime typecheck exit 0; spec typecheck exit 0. - Spec `src/migrations`: `Test Files 5 passed / Tests 198 passed`. - The pin file: `19 passed (19)`. - Ablation at this head: `Tests 1 failed | 18 passed`, `AssertionError: reader-bare-ids: expected 400 to be 200`. Restored: blob `d39570fc2127` equals HEAD. - Full runtime suite: `Test Files 605 passed (605) / Tests 10959 passed | 19 skipped`. - eslint `--no-inline-config` on the three touched `.ts` files: exit 0. - `dispatch-gates --commands`: 94 families, all run, reconciled with `--ran` (94 derived, 94 run). All exit 0 except `check:dual-build-cjs-loads`: NOT MEASURED, because it needs a full `pnpm build`. `check:dts-closure` and `check:lean-entry-closure` first exited 3 before the closure was built, then 0 when re-run after it. --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no authorable key moves; skills/objectstack-ai/SKILL.md already teaches that an action declaring
ai.requiresConfirmationis refused to an AI service account's own key whatever it sends and is a person's to run, and this change holds the flow such an action starts to that same rule.维护者速读
type: 'flow'且ai.requiresConfirmation: true的动作指向该流程,统一回动作入口自己的428 ACTION_CONFIRMATION_REQUIRED,在任何 run 产生之前拒绝,请求带不带confirm都一样;读不到动作声明时回503,不放行。/actions入口读同一实例;前一步加载失败而后一步命中时按后一步判,这是已声明的限定,统一的逐步报错另行跟进。回滚即 revert 本 PR。packages/runtime/src/flow-start-admission.ts(flowStartRefusal中规则 2b 的位置与DECLARATION_READ_FAILED_REFUSAL)、packages/runtime/src/domains/automation.ts(resolveSlotAsActionsDoorReads与servedActionDeclarations的各个读取来源)、packages/runtime/src/flow-start-confirmation-gated-target.test.ts。pnpm --filter @objectstack/runtime exec vitest run --project local src/flow-start-confirmation-gated-target.test.ts,预期 49 passed。Metadata-protocol是否应为semantic(若是,changeset 升为 minor)。What changes
The rule: the confirmation an action declares travels with what it starts. An AI service account (
principalKind: 'agent', noonBehalfOf) does not confirm an action for itself. When an action oftype: 'flow'whosetargetis a flow declaresai.requiresConfirmation: true, a door that starts that flow by name and states the environment's action declarations refuses the account with the action door's own refusal,428 ACTION_CONFIRMATION_REQUIRED(itsdetailsnaming the action, its object and the confirmation member), before any run exists, whatever the request carries. No new error code.packages/runtime/src/flow-start-admission.ts, the one flow start admission predicateflowStartRefusal.requiredPermissions.FlowStartDoorgainsactionDeclarations, which is read only when the caller is an AI service account.confirmationGatedStarterOfreads the declared flag alone (=== true), over every holder of a declaration.confirmationGatedStartRefusalbuilds the refusal. Its code and status are typed to the action door'sActionConfirmationRefusalthrough a type-only import, so the module keeps no value edge intoaction-execution.ts.getFlowand whether or not the probe returns a definition. Rules 1, 2 and 3 still read the definition and are asked only when it is there, as before.DECLARATION_READ_FAILED_REFUSAL, a flat503 SERVICE_UNAVAILABLE(a standard-catalog code), whatever the failure declares. It wraps the declaration read alone, so a failure of the predicate's own flow read travels exactly as before, for every caller.packages/runtime/src/domains/automation.ts. Every trigger route answers through one shared mapper:POST /automation/:name/trigger, the legacyPOST /automation/trigger/:name, and their addressed forms. That mapper states the declarations throughservedActionDeclarationsand serves the refusal'sdetails. The sources:protocolslot serves the merged listings, its merged object and action listings alone;/actionsdoor resolves a declaration from on such a host: the ObjectQL registry's objects (with their embedded actions) and standaloneactionitems, and the metadata service's object and standaloneactionlistings.protocol,objectql,metadata) goes throughresolveSlotAsActionsDoorReads, the smallest composition of the two existing resolvers. First comesresolveService, the order every/actionsread uses: the request's own kernel first on a host that routes a request to a kernel of its own, then the host's scoped factory, then its singletons. Its instance is the instance the same request's/actionsdoor reads, in every host shape. Whichever leg answers, its instance is read, as the/actionsdoor would serve it. Only when no leg answers doesresolveServiceOrLoudclassify the miss. A name nothing registered, or a scoped registration with no instance in this scope, is absent and contributes nothing. Any other rejection is re-raised, so a wired slot that fails to resolve throws. Both steps are scoped by the request's environment, as the door's reads are.503. A source that answers a failed read of its own without throwing (the metadata service's plural listing, which reports a failed loader and answers the other loaders' rows) is judged on the rows it answers.type: 'flow'endpoint door is not judged by rule 2b yet. It states no declarations.packages/runtime/src/endpoint-policy.auth-gate.pin.test.tspins its existing answer on the defaultauthRequired: an API key alone gets401 UNAUTHENTICATEDbefore its flow runs.Unchanged: a person, an OAuth-delegated agent and the system principal, for whom the declarations are not read; an account starting a flow no confirmation-gated action targets; and the action door's own gate (
/actions, MCPrun_action).Overlap: open draft #33646 edits
packages/runtime/src/domains/automation.tsin other hunks: the address-registry imports and the bare-name admission. No hunk is shared.Tests
packages/runtime/src/flow-start-confirmation-gated-target.test.tshas 49 cases, named by the rule:confirm, withconfirm: true, and withconfirm: truebesideparams;getFlow.protocol,objectqlormetadataslot is wired and fails to resolve;getFlowand under each failing slot or listing;confirm.flowStartRefusalunit pins:getFlow, and with a definition the probe does not return: the account gets 428, while a person and an ungated flow are admitted;/actionsdoor reads refuses the account's start. In the kernel-resolver shape, a pin records today's limitation: where the request's own kernel fails to resolve the slot and the host kernel answers it, the start is judged on the host instance, as the/actionsdoor would serve it. That answer changes when per-leg loud resolution lands. In each shape, a composition that merely lacks every source (in SharedProjectPlugin, a scoped factory with no instance in the scope) gains no 503, and the account starts the flow.confirmationGatedStarterOf: reads the declared flag alone, with each fact changed in turn gating nothing, and picks the same action every time when several qualify.Ablations are one-shot, run through
scripts/ablation-replace.mjswith the fix committed first. Every mutation landed on disk, and every restore was verified: blob equal to HEAD andgit diff HEADempty.metadataslotprotocolslotobjectqlslotTwo more standalone-listing legs are reported but not used as the measurement. One removed the read entirely, a stronger mutation: 4 red. The other landed on disk without reproducing that reading: 42 green, a spent leg.
Readings
src/flow-start-confirmation-gated-target.test.ts, Test Files 1 passed (1), Tests 49 passed (49);pnpm --filter @objectstack/runtime typecheckexit 0;check:nul-bytes,check:doc-authoringandcheck:issue-citationseach exit 0. At f7941c7, the two touched test files gave 69 passed, andcheck:test-source-aliasandcheck-adr-0087-registration --base origin/maineach exited 0. A comment and test change owes no battery, so the full runtime project, the full gate derivation and the dogfood battery stand from 9714122, below.At 9714122 (origin/main merged in cdb38cd):
pnpm --filter @objectstack/runtime exec vitest run --project local --maxWorkers=2: Test Files 604 passed (604), Tests 10919 passed, 19 skipped (lock VERDICT command-exit 0).pnpm --filter @objectstack/runtime typecheck: exit 0 (check:test-typecheckOK, ledger held).Acceptance notes
type: 'flow'endpoint door is not judged by rule 2b yet; its defaultauthRequiredrefusal of an API key is pinned./actionsdoor reads: a read failure refuses the start when no step of that door's resolution order answers the name, and where a later step answers, the start is judged on that instance, as the door would serve it.503.requiredPermissionsis answered with the 428.Verification
Gates
node scripts/pm/dispatch-gates.mjs --commands(no paths; derived at 9714122): 71 families.--ranwith exit codes recorded: 71 derived, 71 run, 0 NOT MEASURED.pnpm check:dual-build-cjs-loadsmeasured (exit 0) on a re-run after the dogfood closure finished building: 123 require entry points across 72 packages load.node scripts/check-adr-0087-registration.mjs --base origin/main: exit 0. It reads 1 declared-breaking changeset as[BREAKING+bang+clause-②-narrowing] not-required (no-migration-prescription).pnpm --filter @objectstack/dogfood testunder the lock: VERDICT command-exit 0; Test Files 467 passed, 3 skipped (470); Tests 3958 passed, 42 skipped (4000); no failure.Generated by Claude Code